// ----------------------------------------
// Filename: UART.h
// Description: Routines to implement UART
// Author: Anton Jatmiko
// Date: 24-May-14

#ifndef UART_H
#define UART_H

#include <xc.h>
#include "types.h"

// ----------------------------------------
// UART_Init
//
// Initialise UART and its peripheral
// Input:
//   none
// Output:
//   none
// Conditions:
//   none
void UART_Init(void);

// ----------------------------------------
// UART_WriteChar
//
// Write a byte to UART buffer
// Input:
//   data is the byte to be written
// Output:
//   none
// Conditions:
//   assume UART has been initialised
void UART_WriteChar(UINT8 data);

// ----------------------------------------
// UART_WriteStr
//
// Write a string to UART buffer
// Input:
//   dataPtr is a pointer to the string
// Output:
//   none
// Conditions:
//   assume UART has been initialised
void UART_WriteStr(UINT8 * dataPtr);

#endif